package com.liuyjy.es.model.req;

import lombok.Data;

import java.util.Map;

/**
 * @Author liuyjy
 * @Date 2025/2/24 18:13
 * @Description: TODO
 **/
@Data
public class AggregationCondition {
    private Map<String, AggregationParam> aggregations; // 聚合条件

    public enum AggregationType {
        TERMS, AVG, MAX, MIN
    }

    @Data
    public static class AggregationParam {
        private String field; // 聚合字段
        private AggregationType type; // 聚合类型（TERMS, AVG, MAX, MIN）
    }
}
